package com.hollycrm.unicom.sheet.flowsupport;

import java.util.Iterator;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.hollycrm.unicom.security.AuthToken;

public class PostExecuteManagerBean {

    private Log logger = LogFactory.getLog(getClass());
    private List/*PostExecuteLogic*/ executeLogics;

    public void postExecute(AuthToken authToken, DoOperateContext doc) {
        if (executeLogics != null) {
            for (Iterator iter = executeLogics.iterator(); iter.hasNext();) {
                try {
                    ((PostExecuteLogic) iter.next()).execute(authToken, doc);
                }
                catch (Exception e) {
                    logger.warn("[w] " + e.getMessage());
                }
            }
        }
    }

    public List getExecuteLogics() {
        return executeLogics;
    }
    public void setExecuteLogics(List executeLogics) {
        this.executeLogics = executeLogics;
    }

}
